/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package STUDENT.NGUYENSANG.OOPs.munsach;
import java.util.List;
import java.util.ArrayList;
import java.util.Scanner;
/**
 *
 * @author NSPDL
 */
public class NhapSach {
    static Scanner input=new Scanner(System.in);
    static List<Sach> S =new ArrayList<>();
    public Sach newS()
    {
        Sach s= null;
        String ten=input.nextLine();
        int nam=input.nextInt();
        String tacGia=input.nextLine();
        int soLuong =input.nextInt();
        int check=input.nextInt();
        String chuyenNghanh=null;
        if(check == 0){
                chuyenNghanh = "Khoa Hoc Tu nhien";
            }
            if(check == 1){
                chuyenNghanh = "Van Hoa - Nghe Thhuat";
            }
            if(check == 2){
                chuyenNghanh = "Dien Tu Vien Thong";
            }
            if(check == 3){
                chuyenNghanh = "Cong Nghe Thong Tin";
            }
                int ma = S.size() + 10000;
                s = new Sach(ten, tacGia, chuyenNghanh, ma, nam, soLuong);
                return s;
    }
    public void AddSach()
    {
        Sach s=newS();
        while(s!=null)
        {
            S.add(s);
        }
    }
}

